<%--
  Created by IntelliJ IDEA.
  User: pipi
  Date: 2018/4/22
  Time: 16:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>报价</title>
    <link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/build/css/doc.css" media="all">
</head>
<body>
<div class="layui-form-item">
    <label class="layui-form-label">新增</label>
    <div class="layui-input-block site-block">
        <form class="layui-form" action="/quotation/add" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">报价编号</label>
                <div class="layui-input-block">
                    <input type="text" name="quotationNO" required  lay-verify="required" placeholder="请输入报价编号" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">客户</label>
                <div class="layui-input-block">
                    <select name="customerNO" lay-verify="" lay-search>
                        <c:forEach items="${customers}" var="custom">
                            <option value="${custom.customerNO}">
                                    ${custom.customerName}</option>
                        </c:forEach>
                    </select>
                    <%--<input type="text" name="customerNO" required  lay-verify="required" placeholder="请输入客户名称" autocomplete="off" class="layui-input">--%>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">产品名称</label>
                <div class="layui-input-block">
                    <select name="productNO" lay-verify="" lay-search>
                        <c:forEach items="${products}" var="product">
                            <option value="${product.productNO}">
                                    ${product.productName}</option>
                        </c:forEach>
                    </select>
                    <%--<input type="text" name="productNO" required  lay-verify="required" placeholder="请输入产品名称" autocomplete="off" class="layui-input">--%>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">报价人</label>
                <div class="layui-input-block">
                    <input type="text" name="quotationMan" required  lay-verify="required" placeholder="请输入报价人" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">其他信息</label>
                <div class="layui-input-block">
                    <input type="text" name="otherInfo" required  lay-verify="required" placeholder="其他信息" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
<script src="/plugins/layui/layui.js"></script>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            // layer.msg(JSON.stringify(data.field));
            console.log(data);
            return true;

        });
    });
</script>
</body>
</html>
